Efficient Label Insertion and Collision Handling

ABSTRACT

Techniques are described for efficient label insertion and collision handling. A bounding geometry for a label to be graphically displayed on a display screen as part of an electronic map is determined, wherein the bounding geometry comprises a circle. The bounding geometry is inserted into a grid index, wherein the grid index represents a viewport of the electronic map. Disjoint regions of the grid index intersected by the bounding geometry are identified, wherein each disjoint region represents a different portion of the viewport. For each intersected disjoint region, it is identified whether there is at least one collision between the bounding geometry and one or more existing bounding geometries in the disjoint region; and responsive to identifying whether there is at least one collision in the intersected disjoint region, a target opacity of the label is set.

RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/987,687 (Atty. Docket #33858-39172/US), filed May 23, 2018, theentire contents of which is hereby incorporated by reference as if fullyset forth herein, under 35 U.S.C. § 120.

TECHNICAL FIELD

The disclosure relates generally to the field of generating electronicmaps and specifically to the rendering and animation of labels withinelectronic maps when displayed upon displays of computing devices.

BACKGROUND

Digitally stored electronic maps are used to provide directions to usersof mobile and other computing devices, for example, using any of a widearray of standalone map or direction application programs or apps.Today's electronic maps correctly determine where a mobile device iswithin a few feet or meters, and can show where the user of that mobiledevice is on the electronic map in real time. Additional elements suchas labels may also be shown to better orient the user.

Electronic maps also appear in other applications aside from standalonemapping applications. For example, ride sharing applications, taxiapplications, video games, and other applications may use electronicmaps. These or other applications can obtain electronic maps by callinga map server computer through an Application Programming Interface(API). Thus, a single electronic map provider that owns or operates theserver computer may supply the electronic maps for many differentapplications.

SUMMARY

Geographical maps are increasingly created and stored in an electronicformat, and represent spatial aspects of a given area. In many use casesof electronic maps it is desirable to represent geographic informationin a visually pleasing and comprehensible manner. For example, in manyuse cases it is desirable that labels upon the map do not overlap or“collide.”

In one embodiment, a first method involves determining a boundinggeometry for a label to be graphically displayed on a display screen aspart of an electronic map, wherein the bounding geometry comprises acircle. The bounding geometry is inserted into a grid index, wherein thegrid index represents a viewport of the electronic map. Disjoint regionsof the grid index intersected by the bounding geometry are identified,wherein each disjoint region represents a different portion of theviewport. For each intersected disjoint region, it is identified whetherthere is at least one collision between the bounding geometry and one ormore existing bounding geometries in the disjoint region; and responsiveto identifying whether there is at least one collision in theintersected disjoint region, a target opacity of the label is set.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example computer system in which the techniquesdescribed may be practiced, according to one embodiment.

FIG. 2 is a block diagram that illustrates a computer system upon whichan embodiment may be implemented.

FIG. 3 illustrates a simplified tile pyramid, according to oneembodiment. FIG. 4A illustrates a first example of two labels and theirrespective bounding geometries, according to one embodiment.

FIG. 4A illustrates a first example of two labels and their respectivebounding geometries, according to one embodiment.

FIG. 4B illustrates a second example of two labels and their respectivebounding geometries, according to one embodiment.

FIG. 5 illustrates a grid index and two labels, according to oneembodiment.

FIG. 6A illustrates a grid index cell intersected by two boundinggeometries, according to one embodiment.

FIG. 6B illustrates a grid index cell with individual pixels marked asused, according to one embodiment.

FIG. 7 illustrates a process to insert a label into a grid index,according to one embodiment.

FIG. 8 illustrates a process to add a vector tile to a tile pyramid anddetecting label duplicates therein, according to one embodiment.

FIG. 9 illustrates fading a label in or out upon an electronic map,according to one embodiment.

The figures depict embodiments of the present disclosure for purposes ofillustration only. One skilled in the art will readily recognize fromthe following description that alternative embodiments of the structuresand methods illustrated herein may be employed without departing fromthe principles, or benefits touted, of the disclosure described herein.

DETAILED DESCRIPTION I. General Overview

How to best label map features, especially on an electronic map, is anongoing problem. The problem is further complicated when electronic mapsare capable of rotating, panning, pitching, and zooming in and out,which can change the representation of map features including labels,and may subsequently cause labels to become cluttered or overlap. Theproblem is exacerbated when electronic map data is drawn from multipleindependent sources, requiring cross coordination. As detailed below, anovel approach to collision handling for labels improves thecomprehensibility of electronic maps while more efficiently selectinglabels for display.

In the following description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of the present invention. It will be apparent, however,that the present invention may be practiced without these specificdetails. In other instances, well-known structures and devices are shownin block diagram form in order to avoid unnecessarily obscuring thepresent invention.

Vector tiles are vector data similar to image tiles for web mapping.Vector tiles define geometries and properties of an electronic map, butnot full visual style. The same vector tiles can be used to generatemaps of varying visual styles—a dark, nighttime style can use the samevector tiles as a light, daytime style for visualization, for example.Styles are sets of rules, created independently of vector tiles, whichdefine the visual appearance of an electronic map when it is rendered. Astyle can include information about data sources, style layers, sprites,glyphs, and metadata, for example.

Vector data can include geometry data representing map features such asroads, bodies of water, public parks, buildings, and so on, as well asmetadata corresponding to map features, such as textual labels. Anelectronic map is rendered from one or more vector tiles when requestedby a client, such as a web browser or a mobile application, by applyinga styling to the vector data of the vector tiles to create one or morelayers used to visualize map features. Map features can be representedin a rendered electronic map by graphical elements, which are used toconvey map information to a user of the electronic map. Graphicalelements may include, for example, lines, textures, and colors. Eachlayer is a stylized representation of a portion of an electronic mapbased on both vector data and styling rules. For example, one layer mayrepresent all highways within the geographic area represented by anelectronic map. A second layer may include label graphical elements thatlabel other graphical elements within the electronic map. Depending uponthe embodiment, there may be one or more layers including labelgraphical elements, for example, a first layer including label graphicalelements that label road graphical elements, and a second layerincluding label graphical elements that label city graphical elements.An electronic map including more than one layer renders the layers oneat a time in a predetermined order of highest priority layer to lowestpriority layer. Layer priority may be based on the content of eachlayer, or may be set by a creator of the electronic map. Layer priorityis managed by a collision handling module 170, detailed infra.

A label is a text string or icon used to identify something. Labelgraphical elements are icons and/or strings of text represented upon anelectronic map to identify other, associated graphical elements. Forexample, a road graphical element may have an associated label graphicalelement including a text string “University Avenue” which is renderedupon the electronic map adjacent to or overlaying the road graphicalelement. Label graphical elements can be styled similar to othergraphical elements. A style can affect the size, font, color,highlighting, kerning, displayed text, or so on, of a label graphicalelement. For example, for a label graphical element with text string“University Avenue,” one style may cause a Times New Roman size 12rendering of “University Avenue” in black, while a second style maycause a Calibri size 10 rendering of “University Ave” in red.

The electronic map may be displayed at any of a plurality of zoomlevels. For example, electronic maps may be displayed at zoom levelsfrom 0 to 22; in some embodiments, incremental zoom levels may beselected, such as 2.01, 2.02, or other fractional zooms. In anembodiment, zooming is continuous from a maximum level to a minimumlevel and vice versa. Each zoom level corresponds with one or morevector tiles for that level, as well as with one or more styles, whichcan change as the electronic map is zoomed in or out. For example, theopacity of a line may change as a function of zoom level. Similarly,different layers may be displayed at different zoom levels, and thosedifferent layers may use different geometry data and metadata dependingupon their specific associated vector tiles. In an embodiment, eachlayer has an associated set of labels for graphical elements of thelayer. Labels are added in order by layer, with labels of a higherpriority layer placed upon the electronic map before labels of a lowerpriority layer.

The electronic map can be displayed at a number of combinations of zoom,bearing, and pitch, and may be panned to display different sections ofthe electronic map. Adjusting the zoom, bearing, or pitch may changewhich graphical elements are rendered, including label graphicalelements, and/or how they are rendered. For example, when zoom levelchanges from level 2 (z2) to level 3 (z3) and z3 vector tiles (with dataother than or additional to that of the z2 vector tiles) are loaded andused for rendering, additional graphical elements not included in the z2vector tiles (but included in the z3 vector tiles) are rendered.Henceforth in this specification a zoom level may be referred to by “z”followed by its numerical value, such as z3. Vector tiles may likewisebe referred to by a specific associated zoom level, such as z3 vectortiles. Similarly, a label graphical element may be referred to as a“label” and a graphical element in general may be referred to as a“symbol.”

II. System Overview

Computer-implemented techniques are provided for rendering electronicmaps with collision handling for label graphical elements. FIG. 1illustrates an example computer system in which the techniques providedmay be practiced, according to one embodiment.

FIG. 1 uses like reference numerals to identify like elements. A letterafter a reference numeral, such as “115A,” indicates that the textrefers specifically to the element having that particular referencenumeral. A reference numeral in the text without a following letter,such as “115,” refers to any or all of the elements in the figuresbearing that reference numeral. For example, “115” in the text refers toreference numerals “115A,” and/or “115B” in the figures.

In an embodiment, a computer system 100 comprises components that areimplemented at least partially by hardware at one or more computingdevices, such as one or more hardware processors executing storedprogram instructions stored in one or more memories for performing thefunctions that are described herein. In other words, all functionsdescribed herein are intended to indicate operations that are performedusing programming in a special-purpose computer or general-purposecomputer, in various embodiments. FIG. 1 illustrates only one of manypossible arrangements of components configured to execute theprogramming described herein. Other arrangements may include fewer ordifferent components, and the division of work between the componentsmay vary depending on the arrangement.

FIG. 1 illustrates a mobile computing device 150 that is coupled via awireless network connection 180 to a server computer 105, which iscoupled to a database 125. A GPS satellite 190 is coupled via a wirelessconnection to the mobile computing device 150. The server computer 105comprises a mapping application 110, an application programminginterface (API) 115, a collision handling module 170B and a databaseinterface 120. The database 125 comprises electronic map source data130, electronic map data 140, telemetry data 135, and aggregatedtelemetry data 145. The mobile computing device 150 comprises a GPStransceiver 155, client map application 160, software development kit(SDK) 165, collision handling module 170A, and wireless networkinterface 175.

II.A. Server and Database

Server computer 105 may be any computing device, including but notlimited to: servers, racks, work stations, personal computers, generalpurpose computers, laptops, Internet appliances, wireless devices, wireddevices, multi-processor systems, mini-computers, and the like. AlthoughFIG. 1 shows a single element, the server computer 105 broadlyrepresents one or multiple server computers, such as a server cluster,and the server computer may be located in one or more physicallocations. Server computer 105 also may represent one or more virtualcomputing instances that execute using one or more computers in adatacenter such as a virtual server farm.

Server computer 105 is communicatively connected to database 125 andmobile computing device 150 through any kind of computer network usingany combination of wired and wireless communication, including, but notlimited to: a Local Area Network (LAN), a Wide Area Network (WAN), oneor more internetworks such as the public Internet, or a company network.Server computer 105 may host or execute mapping application 110, and mayinclude other applications, software, and other executable instructions,such as database interface 120, to facilitate various aspects ofembodiments described herein.

In one embodiment, database interface 120 is a programmatic interfacesuch as JDBC or ODBC for communicating with database 125. Databaseinterface 120 may communicate with any number of databases and any typeof database, in any format. Database interface 120 may be a piece ofcustom software created by an entity associated with mapping application110, or may be created by a third party entity in part or in whole.

In one embodiment, database 125 is a data storage subsystem consistingof programs and data that is stored on any suitable storage device suchas one or more hard disk drives, memories, or any other electronicdigital data recording device configured to store data. Althoughdatabase 125 is depicted as a single device in FIG. 1, database 125 mayspan multiple devices located in one or more physical locations. Forexample, database 125 may include one or more nodes located at one ormore data warehouses. Additionally, in one embodiment, database 125 maybe located on the same device or devices as server computer 105.Alternatively, database 125 may be located on a separate device ordevices from server computer 105.

Database 125 may be in any format, such as a relational database, anoSQL database, or any other format. Database 125 is communicativelyconnected with server computer 105 through any kind of computer networkusing any combination of wired and wireless communication of the typepreviously described. Optionally, database 125 may be communicativelyconnected with other components, either directly or indirectly, such asone or more third party data suppliers. Generally, database 125 storesdata related to electronic maps including, but not limited to:electronic map source data 130, electronic map data 140, telemetry data135, and aggregated telemetry data 145. These datasets may be stored ascolumnar data in a relational database or as flat files.

In one embodiment, electronic map source data 130 is raw digital mapdata that is obtained, downloaded or received from a variety of sources.The raw digital map data may include satellite images, digital streetdata, building or place data or terrain data. Example sources includeNational Aeronautics and Space Administration (NASA), United StatesGeological Survey (USGS), and DigitalGlobe. Electronic map source data130 may be updated at any suitable interval, and may be stored for anyamount of time. Once obtained or received, electronic map source data130 is used to generate electronic map data 140.

In one embodiment, electronic map data 140 is digital map data that isprovided, either directly or indirectly, to client map applications,such as client map application 160, using an API. Electronic map data140 is based on electronic map source data 130. Specifically, electronicmap source data 130 is processed and organized as a plurality of vectortiles which may be subject to style data to impose different displaystyles, and which may be organized in a tile pyramid. Electronic mapdata 140 may be updated at any suitable interval, and may includeadditional information beyond that derived from electronic map sourcedata 130. For example, using aggregated telemetry data 145, discussedbelow, various additional information may be stored in the vector tiles,such as traffic patterns, turn restrictions, detours, common or popularroutes, speed limits, new streets, and any other information related toelectronic maps or the use of electronic maps.

In one embodiment, telemetry data 135 is digital data that is obtainedor received from mobile computing devices via function calls that areincluded in a Software Development Kit (SDK) that application developersuse to integrate and include electronic maps in applications. Asindicated by the dotted lines, telemetry data 135 may be transientlystored, and is processed as discussed below before storage as aggregatedtelemetry data 145.

The telemetry data may include mobile device location information basedon GPS signals. For example, telemetry data 135 may comprise one or moredigitally stored events, in which each event comprises a plurality ofevent attribute values. Telemetry events may include: session start, mapload, map pan, map zoom, map tilt or rotate, location report, speed andheading report, or a visit event including dwell time plus location.Telemetry event attributes may include latitude-longitude values for thethen-current position of the mobile device, a session identifier,instance identifier, application identifier, device data, connectivitydata, view data, and timestamp.

In one embodiment, aggregated telemetry data 145 is telemetry data 135that has been processed using anonymization, chunking, filtering, or acombination thereof. Anonymization may include removing any data thatidentifies a specific mobile device or person. Chunking may includesegmenting a continuous set of related telemetry data into differentsegments or chunks representing portions of travel along a route. Forexample, telemetry data may be collected during a drive from John'shouse to John's office. Chunking may break that continuous set oftelemetry data into multiple chunks so that, rather than consisting ofone continuous trace, John's trip may be from John's house to point A, aseparate trip from point A to point B, and another separate trip frompoint B to John's office. Chunking may also remove or obscure startpoints, end points, or otherwise break telemetry data into any size.Filtering may remove inconsistent or irregular data, delete traces ortrips that lack sufficient data points, or exclude any type or portionof data for any reason. Once processed, aggregated telemetry data 145 isstored in association with one or more tiles related to electronic mapdata 140. Aggregated telemetry data 145 may be stored for any amount oftime, such as a day, a week, or more. Aggregated telemetry data 145 maybe further processed or used by various applications or functions asneeded.

II.B. Mobile Computing Device

In one embodiment, mobile computing device 150 is any mobile computingdevice, such as a laptop computer, hand-held computer, wearablecomputer, cellular or mobile phone, portable digital assistant (PDA), ortablet computer. Alternatively, mobile computing device 150 could be adesktop computer or an interactive kiosk. Although a single mobilecomputing device is depicted in FIG. 1, any number of mobile computingdevices may be present. Each mobile computing device 150 iscommunicatively connected to server computer 105 through wirelessnetwork connection 180 which comprises any combination of a LAN, a WAN,one or more internetworks such as the public Internet, a cellularnetwork, or a company network.

Mobile computing device 150 is communicatively coupled to GPS satellite190 using GPS transceiver 155. GPS transceiver 155 is a transceiver usedby mobile computing device 150 to receive signals from GPS satellite190, which broadly represents three or more satellites from which themobile computing device may receive signals for resolution into alatitude-longitude position via triangulation calculations.

Mobile computing device 150 also includes wireless network interface 175which is used by the mobile computing device to communicate wirelesslywith other devices. In particular, wireless network interface 175 isused to establish wireless network connection 180 to server computer105. Wireless network interface 175 may use WiFi, WiMAX, Bluetooth,ZigBee, cellular standards or others.

Mobile computing device 150 also includes collision handling module 170Awhich is used by the mobile computing device as part of the client mapapplication 160 to provide label collision handling functionality. Insome embodiments collision handling module 170A collaborates withcollision handling module 170B of the server computer 105 to providelabel collision handling functionality. Alternatively, either collisionhandling module 170A or collision handling module 170B solely provideslabel collision handling functionality, in which case the other modulemay not be present in the system.

Mobile computing device 150 also includes other hardware elements, suchas one or more input devices, memory, processors, and the like, whichare not depicted in FIG. 1. Mobile computing device 150 also includesapplications, software, and other executable instructions to facilitatevarious aspects of embodiments described herein. These applications,software, and other executable instructions may be installed by a user,owner, manufacturer, or other entity related to mobile computing device150. In one embodiment, mobile computing device 150 includes client mapapplication 160 which is software that displays, uses, supports, orotherwise provides electronic mapping functionality as part of theapplication or software. Client map application 160 may be any type ofapplication, such as a taxi service, a video game, a chat client, a fooddelivery application, etc. In an embodiment, client map application 160obtains electronic mapping functions through SDK 165, which mayimplement functional calls, callbacks, methods or other programmaticmeans for contacting the server computer to obtain digital map tiles,layer data, or other data that can form the basis of visually renderinga map as part of the application. In general, SDK 165 is a softwaredevelopment kit that allows developers to implement electronic mappingwithout having to design all of the components from scratch. Forexample, SDK 165 may be downloaded from the Internet by developers, andsubsequently incorporated into an application which is later used byindividual users.

In server computer 105, the mapping application 110 provides the API 115that may be accessed, for example, by client map application 160 usingSDK 165 to provide electronic mapping to client map application 160.Specifically, mapping application 110 comprises program instructionsthat are programmed or configured to perform a variety of backendfunctions needed for electronic mapping including, but not limited to:sending electronic map data to mobile computing devices, receivingtelemetry data 135 from mobile computing devices, processing telemetrydata to generate aggregated telemetry data 145, receiving electronic mapsource data 130 from data providers, processing electronic map sourcedata 130 to generate electronic map data 140, and any other aspects ofembodiments described herein. Mapping application 110 includes collisionhandling module 170B which may be used to enable label collisionhandling functionality on client map application 160. Depending uponembodiment, label collision handling functionality may be providedwholly on the mobile computing device 150 via collision handling module170A, wholly on the server computer 105 via collision handling module170B, or in part by each collision handling module 170 working inconjunction.

II.C. Hardware Environment

According to one embodiment, the techniques described herein areimplemented by one or more special-purpose computing devices. Forexample, the server computer 105 and mobile computing device 150 may becomputer devices configured as special-purpose computing devices. Thespecial-purpose computing devices may be hard-wired to perform thetechniques, or may include digital electronic devices such as one ormore application-specific integrated circuits (ASICs) or fieldprogrammable gate arrays (FPGAs) that are persistently programmed toperform the techniques, or may include one or more general purposehardware processors programmed to perform the techniques pursuant toprogram instructions in firmware, memory, other storage, or acombination. Such special-purpose computing devices may also combinecustom hard-wired logic, ASICs, or FPGAs with custom programming toaccomplish the techniques. The special-purpose computing devices may bedesktop computer systems, portable computer systems, handheld devices,networking devices or any other device that incorporates hard-wired andprogram logic to implement the techniques.

For example, FIG. 2 is a block diagram that illustrates a computersystem 200 upon which an embodiment of the invention may be implemented.Computer system 200 includes a bus 202 or other communication mechanismfor communicating information, and a hardware processor (CPU) 204 andgraphics processor (GPU) 206 coupled with bus 202 for processinginformation. CPU 204 may be, for example, a general purposemicroprocessor. GPU 206 may be, for example, a graphics processing unitwith a high core count which is optimized for parallel processing andgraphics rendering.

Computer system 200 also includes a main memory 210, such as a randomaccess memory (RAM) or other dynamic storage device, coupled to bus 202for storing information and instructions to be executed by CPU 204. Mainmemory 210 also may be used for storing temporary variables or otherintermediate information during execution of instructions to be executedby CPU 204 and/or GPU 206. Such instructions, when stored innon-transitory storage media accessible to CPU 204 and/or GPU 206,render computer system 200 into a special-purpose machine that iscustomized to perform the operations specified in the instructions.

Computer system 200 further includes a read only memory (ROM) 212 orother static storage device coupled to bus 202 for storing staticinformation and instructions for CPU 204 and/or GPU 204. A storagedevice 214, such as a magnetic disk or optical disk, is provided andcoupled to bus 202 for storing information and instructions.

Computer system 200 may be coupled via bus 202 to a display 216, such asan LCD screen, LED screen, or touch screen, for displaying informationto a computer user. An input device 218, which may include alphanumericand other keys, buttons, a mouse, a touchscreen, and/or other inputelements is coupled to bus 202 for communicating information and commandselections to CPU 204 and/or GPU 206. In some embodiments, the computersystem 200 may also include a cursor control 220, such as a mouse, atrackball, or cursor direction keys for communicating directioninformation and command selections to CPU 204 and/or GPU 206 and forcontrolling cursor movement on display 216. The cursor control 220typically has two degrees of freedom in two axes, a first axis (e.g., x)and a second axis (e.g., y), that allows the device to specify positionsin a plane.

Computer system 200 may implement the techniques described herein usingcustomized hard-wired logic, one or more ASICs or FPGAs, firmware andprogram logic which in combination with the computer system causes orprograms computer system 200 to be a special-purpose machine. Accordingto one embodiment, the techniques herein are performed by computersystem 200 in response to CPU 204 and/or GPU 206 executing one or moresequences of one or more instructions contained in main memory 210. Suchinstructions may be read into main memory 210 from another storagemedium, such as storage device 214. Execution of the sequences ofinstructions contained in main memory 210 causes CPU 204 and/or GPU 206to perform the process steps described herein. In alternativeembodiments, hard-wired circuitry may be used in place of or incombination with software instructions.

The term “storage media” as used herein refers to any non-transitorymedia that store data and instructions that cause a machine to operationin a specific fashion. Such storage media may comprise non-volatilemedia and volatile media. Non-volatile media includes, for example,optical or magnetic disks, such as storage device 214. Volatile mediaincludes dynamic memory, such as main memory 210. Common forms ofstorage media include, for example, a floppy disk, a flexible disk, harddisk, solid state drive, magnetic tape, or any other magnetic datastorage medium, a CD-ROM, any other optical data storage medium, anyphysical medium with patterns of holes, a RAM, a PROM, and EPROM, aFLASH-EPROM, NVRAM, any other memory chip or cartridge.

Storage media is distinct from but may be used in conjunction withtransmission media. Transmission media participates in transferringinformation between storage media. For example, transmission mediaincludes coaxial cables, copper wire and fiber optics, including thewires that comprise bus 202. Transmission media can also take the formof acoustic, radio, or light waves, such as those generated duringradio-wave and infra-red data communications, such as WI-FI, 3G, 4G,BLUETOOTH, or wireless communications following any other wirelessnetworking standard.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to CPU 204 and/or GPU 206 for execution. Forexample, the instructions may initially be carried on a magnetic disk orsolid state drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 200 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 202. Bus 202 carries the data tomain memory 210, from which CPU 204 and/or GPU 206 retrieves andexecutes the instructions. The instructions received by main memory 210may optionally be stored on storage device 214 either before or afterexecution by CPU 204 and/or GPU 206.

Computer system 200 also includes a communication interface 208 coupledto bus 202. Communication interface 208 provides a two-way datacommunication coupling to a network link 222 that is connected to alocal network 224. For example, communication interface 208 may be anintegrated services digital network (ISDN) card, cable modem, satellitemodem, or a modem to provide a data communication connection to acorresponding type of telephone line. As another example, communicationinterface 208 may be a local area network (LAN) card to provide a datacommunication connection to a compatible LAN. Wireless links may also beimplemented. In any such implementation, communication interface 208sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.

Network link 222 typically provides data communication through one ormore networks to other data devices. For example, network link 222 mayprovide a connection through local network 224 to a host computer 226 orto data equipment operated by an Internet Service Provider (ISP) 228.ISP 228 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 230. Local network 224 and Internet 230 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 222and through communication interface 208, which carry the digital data toand from computer system 200, are example forms of transmission media.

Computer system 200 can send messages and receive data, includingprogram code, through the network(s), network link 222 and communicationinterface 208. In the Internet example, a server 232 might transmit arequested code for an application program through Internet 230, ISP 228,local network 224 and communication interface 208. The received code maybe executed by CPU 204 and/or GPU 206 as it is received, and stored instorage device 214, or other non-volatile storage for later execution.

III. Tile Pyramid

FIG. 3 illustrates a simplified tile pyramid 300, according to oneembodiment. A tile pyramid is a tree of vector tiles. The root of thetree is a singular z0 vector tile 310 with high level vector data forthe entire geographic area captured by the electronic map. For example,the z0 vector tile 310 of a world map would define high level geometriesand properties for the entire world, such as continents, oceans, andnational borders.

This example z0 vector tile 310 has four children, each a z1 vector tile(vector tiles 320A-D) that has more detailed vector data for a quarterof the z0 vector tile. The quarter of the z0 vector tile 310 representedby each z1 vector child is, for example, a Cartesian quadrant of theparent z0 vector tile 310, as represented by dashed lines upon the z0vector tile 310 in the figure. The more specific vector data each z1vector tile 320 includes may be, for example, state borders, majorrivers and lakes, and mountain ranges. Each z1 vector tile 320 caninclude vector data similar to that of the z0 vector tile 310. Forexample, if vector tile 320B includes vector data for both Europe andAsia, a continental border may be included in the vector data.

Similarly, in this example each z1 vector tile 320 has four children inthe tree, which each represent a quarter of their respective parent. Forexample, z1 vector tile 320A has z2 vector tiles 330A-D as children.Each z2 vector tile 330 has more detailed vector data than that of itsparent z1 vector tile 320A, similar to how each z1 vector tile 320included more detailed vector data than their parent, the z0 vector tile310. For example, each z2 vector tile 330 vector data may include datafor major cities, major highways, and forests, plains, deserts and otherlarge geographic features.

In a similar manner, this example tree grows with each zoom level, witheach child vector tile having its own four children until a maximum zoomlevel is reached. z2 vector tile 330A has children z3 vector tiles340A-D, z3 vector tile 340 a has children z4 vector tiles 350A-D, and soon, up to a maximum zoom level. For example, if zoom levels range from 0to 22, the highest, most zoomed out level, z0, has 1 z0 vector tile 310,the next level, z1, has 4 vector tiles 320, z2 has 16 vector tilesincluding vector tiles 330, z3 has 64 vector tiles including vectortiles 340, and so on. As zoom level increases, vector tiles show a moregeographically-granular level of detail while representing a smalleroverall geographic area. While the z0 vector tile 310 may represent theentire world, a z22 vector tile may represent a cul-de-sac or asimilarly small geographic area and the features therein.

There is a unique path traversing the tree from the root z0 vector tile310 to each subsequent vector tile at each zoom level, all the way toleaf vector tiles at the other end of the tree (representing the highestzoom level). For example, there is a unique path from the z0 vector tile310 to z4 vector tile 350A, traversing vector tiles 320A, 330A, and340A. In an embodiment, when detecting duplicate labels for a certainvector tile, it is other vector tiles in the certain vector tile'sunique path that are queried (the vector tile's “vector tile family”),which can include all parents and children of the certain vector tile.This is discussed in further detail infra in section VII. DuplicateDetection.

The tile tree is managed by the collision handling module 170 and, asdetailed supra with regard to FIG. 2, is stored in the database 125 asindividual vector tiles. In one embodiment, the entire vector tilefamily of a vector tile is queried against when detecting duplicates. Inanother embodiment, the collision handling module 170 queries only thosevector tiles of a vector tile family that are used for the rendering atthe time of the query (vector tiles of the vector tile family that arein the “render tree” at a particular instant). For example, if arendered electronic map uses vector data from only the z0 vector tile310 and z1 vector tiles 320A and 320B, and z2 vector tile 330A issubsequently added, then when detecting duplicates for the z2 vectortile 330A, only the z1 vector tile 320A and the z0 vector tile 310 arequeried, rather than those and all children of z2 vector tile 330A. Inthis manner less queries need be performed, conserving computerresources such as processor clock cycles. Furthermore, fewer vectortiles (e.g., only the queried tiles) may need to be stored in mainmemory 210 for further computation, thereby more efficiently using themain memory 210, freeing more memory for other use. In this example itis not necessary to query the children of the z2 vector tile 330Abecause no data from the children is used in the rendered electronicmap, and duplicate labels in unused vector tiles do not affect therendered electronic map. Depending upon the embodiment, the vector tilefamily comprises both every parent and child of a vector tile, or onlythose parents and children also in the render tree.

A vector tile with the highest zoom level in its family in the rendertree may be referred to as a “front-most” vector tile. In oneembodiment, only graphical elements (such as labels) from front-mostvector tiles are rendered. As such, the rendered electronic map mayinclude vector data from vector tiles of different zoom levels dependingupon which vector tiles have been added to the render tree and which ofthose vector tiles have been rendered. For example, if two vector tilesof level z2 are added to the render tree of an electronic map currentlyrendering z1 vector tiles, first one z2 vector tile is rendered, thenthe second; in between the rendering of the first and second z2 vectortiles, vector data from the first z2 vector tile and vector data fromone or more z1 vector tiles are rendered simultaneously, as the secondz2 vector tile is not yet rendered. However, as the z2 vector tile isfront-most, its vector data is swapped in for the remaining z1 vectordata once it is rendered.

Each vector tile in the tile pyramid 300 may have its own coordinatesystem. In this case, the z0 vector tile 310 coordinate system is a“global coordinate system” to which all other vector tiles can bemapped. For example, each z1 vector tile 320 coordinate system coversone fourth the area of the z0 vector tile 310 global coordinate system.As such, in this example there is a power of 2 relationship amongcoordinates of zoom levels one level of the tree apart from each other,however this relation may vary depending on tree structure and/or therelative geographic area represented by vector tiles of successive zoomlevels. In an embodiment, vector tile coordinates converted to globalcoordinates are rounded down.

IV. Bounding Geometries

FIG. 4A illustrates a first example of two labels and their respectivebounding geometries, according to one embodiment. FIG. 4B illustrates asecond example of two labels and their respective bounding geometries,according to one embodiment. Each has a viewport 410. A viewport 410 isthe portion of an electronic map that is rendered and displayed upon adisplay 216 of a mobile computing device 150 at a given point in time.The viewport changes over time as the user interacts with the mobilecomputing device 150. For example, the user can pan, rotate, pitch,and/or zoom the map using input device 218 and/or cursor control 220such that the viewport 410 displays a different portion of theelectronic map, or a different view of the same portion of theelectronic map. In an embodiment there are two kinds of labels, pointlabels like point label 440 and line labels like line label 450.

Each of the illustrated example viewports 410 also has an icon 445, apoint label 440, a road 430, and a line label 450. The icon 445 is agraphical element visualizing a map feature, such as a city, upon theportion of the electronic map rendered and displayed in the viewport410. Point labels 440 and line labels 450 are vector data. Point label440 is a label for the map feature visualized by the icon 445, which inthis example is the city Palo Alto. The point label 440 includes a textstring “Palo Alto” and a rectangular bounding geometry surrounding thetext. When detecting collisions between labels, whether point or linelabels, bounding geometries are used, rather than the shape of the textitself. Bounding geometries are simplifying geometries that allow forcollision detection using less complex techniques than if the morecomplex geometries of text strings themselves are used.

Bounding geometries are fitted to the text string such that the boundinggeometry encapsulates the text string. In an embodiment, the text stringof a point label is rendered such that it takes as little of theviewport 410 as possible and is as rectangular as possible. For example,the point label 440 has “Palo” above “Alto” to create a more compact andrectangular label than having the words side by side. Alternatively, insome embodiments, text strings are constrained by a maximum width. Insuch embodiments, line breaks in text strings are arranged to minimizethe area of the bounding geometry. Bounding geometries, in contrast totext strings, are neither rendered nor displayed. The point label 440 isplaced at a fixed location within the viewport 410 near the icon 445.The fixed location is determined by an anchor, which is vector dataindicating a position near the icon 445 where the point label 440 shouldbe placed if there is space for it.

Point labels 440 in general can include any of a plurality of textstrings, and can be fixed to an anchor at any of a plurality of pointsupon the electronic map near an associated icon 445. In someembodiments, point labels 440 are oriented to the viewport plane, ratherthan the plane of the electronic map. If the electronic map is pitchedto provide an isometric view, for example, the point label 440—the textstring and rectangular bounding geometry—remain facing the viewport, anddo not pitch with the rest of the electronic map. Similarly, pointlabels 440 are unaffected by rotation, and remain in the same relativelocation, oriented the same direction. A 180 degree rotation of theelectronic map does not flip the text upside down, for example; the icon445 and point label 440 may move, but the point label 440 remains at itslocation relative to the icon 445 and orientation relative to theviewport 410. Point labels are singular; duplicates are not rendered atthe same time. In some embodiments, point labels 440 are oriented to theplane of the electronic map, in which case the point labels 440 movewith the map, such as pitching as the map pitches. Orienting pointlabels 440 to the viewport plane is often preferable since such labelsare often more legible than labels oriented to the map plane.

Road 430 is a graphical element representing a map feature, such as theroad University Avenue in Palo Alto as in this example. Line label 450is a label for the map feature visualized by road 430. The line label450 includes a text string “University Avenue” and seven circles thatform a bounding geometry for the line label 450. The text string of aline label is rendered such that it follows the curvature of the mapfeature it labels, whether it be a road, a river, a border, or so on. Inthis example, “University Avenue” is curved such that it follows thecurve of road 430. Unlike point labels like point label 440, line labelslike line label 450 are not fixed to any particular orientation. Rather,line labels 450 adjust such that they remain bound to the curvature ofthe map feature they label. The text string of the line label 450 isbounded by the seven circles that, like the text string, follow thecourse of the underlying geometry of the map feature. Though thisexample uses seven circles, any number of circles may be used such thatthe beginning and end of the text string are encapsulated, there is notmore than a first threshold distance between adjacent circles, and thereis not more than a second threshold amount of overlap between any twocircles. The thresholds are set by the collision handling module 170 anddepend upon the size of the circles, which in turn may depend upon thesize of the characters of the text string. In an embodiment, there isone circle per character of the text string.

Unlike point labels 440, line labels 450 have multiple anchors, one percircle. These anchors are fixed to the underlying geometry of thelabeled map feature, such as the circles of line label 450 with road430. If the road 430 rotates, for example, the circles rotate as well,as does the text string. Furthermore, there may be duplicates of linelabels. For example, if a road 430 crosses the entire viewport 410, itcan be labeled several times at various locations along the road. Theseduplicates each have a minimum zoom level at which they may be rendered,thereby ensuring adequate spacing between duplicate labels. The minimumzoom levels are managed by and may be set by the collision handlingmodule 170. Minimum zoom levels are set such that fewer labels appear atlower zoom levels (a farther out view, the viewport visualizing agreater geographic area) and more appear at higher zoom levels (a closerview, the viewport visualizing a smaller geographic area).

Depending upon the embodiment, line labels 450 may be fixed inorientation to the viewport (like point labels 440), or may be fixed tothe electronic map, adjusting as it is pitched. In such latterembodiments, the bounding geometry may be re-determined by the collisionhandling module 170 upon adjustment of the electronic map to take intoaccount the new perspective of the electronic map relative to theviewport. In general, determining bounding geometries takes into accountthe size and shape of the text or icon of the label being bound, and mayfurther take into account a view angle as determined by the position ofthe electronic map in relation to the viewport. For example, if theelectronic map is pitched such that the viewport adjusts from a top-downview of the electronic map to an isometric view of the electronic map,labels and therefore bounding geometries may tilt with the electronicmap and, as a result, change in shape, such as reducing in ‘height’ orvertical aspect.

In FIG. 4A the point label 440 and line label 450 do not intersect.However, the electronic map may be rotated clockwise to result in theviewport 410 of FIG. 4B, in which case the point label 440 and linelabel 450 do intersect, at collision 420. Intersecting labels can bevisually displeasing and difficult to discern from one another. Removingone of the intersected labels would likely cause the other one to becomprehensible and more useful to a user of the electronic map.

Using circles for line label 450 bounding geometries provides severalbenefits over rectangles while still allowing for efficient collisiondetection and handling. Circles are stable under rotation; when the mapis manipulated, the circles may move, but they do not move relative toother features of the map. This is unlike rectangles which, whenrotated, extend into regions of the electronic map not previouslyoverlapped by those rectangles. This is because circles by definitionhave constant radius, whereas rectangles do not. Another benefit ofusing circles is the efficiency with which collision detection may beperformed using them as compared to a complex polygon. Determiningcollisions between circles and circles, circles and rectangles, orrectangles and rectangles is much less rigorous than determiningcollisions among complex polygonal geometries (such as the actual shapesof text strings). For example, a dense network of roads with dozens tohundreds of line labels may require more time to process than isdesirable; the use of bounding geometries to reduce the complexity ofcollision detection can reduce the time necessary to determinecollisions and therefore improve the usability of the electronic map.

V. Grid Index

FIG. 5 illustrates a grid index 500 and two labels, according to oneembodiment. A grid index 500 is a representation of the viewport 410that is displayed upon the display 216 of the mobile computing device150 used to detect collisions among labels. The grid index 500 is partof the collision handling module 170, for example, as a data structurerepresenting each pixel of the viewport 410, or a data structurerepresenting the electronic map in terms of global coordinate space. Thedisplay 216 includes a plurality of pixels arranged in a grid. Forexample, the grid may be 600 pixels wide and 600 pixels long, with360,000 pixels total. The grid index 500 maps to this grid, formingdisjoint regions of the grid. For example, the grid index 500 could mapthe 600 by 600 pixel grid into 400 30-pixel-square disjoint regions(dividing the grid such that it is 20 disjoint regions wide and 20disjoint regions long). Alternatively, the grid index 500 may map the600 by 600 pixel grid into 400 disjoint regions of global coordinatespace that split the global coordinate space into equal-area divisions.The size and number of disjoint regions depends upon the embodiment.

In one embodiment, the collision handling module 170 determines the sizeand number of disjoint regions based on the size of the boundinggeometries of vector tiles being used and on the dimensions of the grid.For example, the collision handling module 170 determines disjointregions such that each disjoint region is a square with a side lengththat is within a threshold number of pixels of twice the radius of thebounding geometry circles. For example, if the bounding geometry circleshave an average radius of 16 pixels, the disjoint regions may each be 30pixels wide and 30 pixels long. The threshold may be determined by thecollision handling module 170 or may be set by an implementer of thesystem.

The grid index 500 improves label collision detection efficiency, andtherefore label insertion. For example, when inserting a new label,rather than checking against all existing labels already in the gridindex, only existing labels in disjoint regions intersected by the newlabel need be checked. As such, increasing the dimensions of the gridindex 500 and/or the number of entries does not significantly impact theamount of computing resources necessary to insert a new label. This isbecause, for any given insertion, finding the intersected disjointregions is nearly constant, and the number of existing labels withinthose disjoint regions to compare against is a function of the densityof the grid index 500, in terms of labels, rather than its overall size.This density is limited by a number of labels that can fit in a disjointregion, rather than by a size of the grid index 500, and therefore isindependent of the size of the grid index. For example, if no label islarge enough to intersect more than 4 disjoint regions, and eachdisjoint region cannot fit more than 3 labels, there will not be morethan 12 labels to compare against for any label insertion, regardless ofthe size of the grid index 500 overall. As such the size of the gridindex does not significantly impact the efficiency of label collisiondetection, allowing near-constant-time label insertion and collisiondetection per label.

The grid index 500 in the embodiment of FIG. 5 maps to a display 216with a pixel grid 30 pixels wide and 50 pixels long, and includes 15disjoint regions. Each disjoint region maps to 100 pixels (a 10 pixel by10 pixel square). Point label 440 is positioned within the viewport suchthat it intersects four disjoint regions (disjoint regions 510, 512,520, and 522). Similarly, line label 450 is positioned within theviewport such that it intersects five disjoint regions (disjoint regions522, 524, 526, 532, and 534). Disjoint regions 514, 16, 518, 528, 530,536, and 538 are not intersected by either label. The only disjointregion intersected by both point label 440 and line label 450 isdisjoint region 522. Specifically, the rectangular bounding geometry ofpoint label 440 and circle 550 of the circular bounding geometries ofline label 450 intersect disjoint region 522. As such, disjoint region522 is the disjoint region that the collision handling module 170 checksfor a collision between Point Label 440 and Line Label 450, as describedbelow with respect to FIG. 6.

FIG. 6A illustrates a grid index cell intersected by two boundinggeometries, according to one embodiment. More specifically, itillustrates the bounding geometries of point label 440 and circle 550,as well as the pixels of disjoint region 522. The disjoint region 522maps to pixels of the grid, such as pixel 620, which is not intersectedby either bounding geometry. FIG. 6B illustrates a grid index cell withindividual pixels marked as used, according to one embodiment. Thepixels of disjoint region 522 in FIG. 6A that are intersected by eitherof the two bounding geometries are distinguished from non-intersectedpixels. For example, pixel 630 is intersected by the bounding geometryof point label 440 and is illustratively distinguished in the Figurefrom non-intersected pixels, such as pixel 620, using diagonal lines. Asshown in FIG. 6B, point label 440 and circle 550 do not collide, as nopixel is used by each (“overlaps” or “intersects”). Techniques toidentify collisions, as well as the grid index 500 in general, arediscussed in detail infra in section VI. Label Insertion.

In the interest of clarity, the present disclosure details labelcollision detection using pixel-based techniques. In other embodimentslabel collision detection is performed using other coordinatetechniques. For example, in an embodiment disjoint regions are definedin terms of global coordinates, bounding geometries are likewise interms of global coordinates, and label collision detection is performedusing global coordinate-based techniques. For example, each boundinggeometry is defined by global coordinate bounds, such as four points inglobal coordinate space that marks the corners of a rectangular boundinggeometry, or a point in global coordinate space and a radius that areused to define a circular bounding geometry. In such embodiments, ratherthan marking pixels, it is instead the bounding geometries that aremarked, and/or portions of disjoint regions of the grid index, definedin terms of global coordinates. Alternatively, for example, a coordinatesystem defined with respect to the viewport may be used, with techniquessimilar to global coordinate-based techniques. In an embodiment, theviewport coordinate system is based on the global coordinate system.

VI. Label Insertion

FIG. 7 illustrates a process to insert a label into a grid index,according to one embodiment. The process is performed for each label ina set of labels of a vector tile. For example, for each front-mostvector tile of an electronic map, each label is inserted in order bylayer, as detailed supra. Prioritization by layer can ensure that labelsconsidered more important to a creator of the electronic map arerendered rather than less important labels, especially in embodimentswhere there are more labels than there is available space for labelsupon the map. For example, major highways may be prioritized overbuilding names such that labels in a highway label layer are insertedbefore labels in a building name layer. If so, any time there is aregion of the grid index where a highway label and a building labelwould overlap, the highway label is rendered and the building label isnot. This is because the space is available until the highway label isplaced, and thus is available to the highway label. However, atinsertion of the building label, the space is already taken by thehighway label, preventing insertion of and therefore rendering of thebuilding label.

The collision handling module 170 determines 705 a bounding geometry fora label. Determining 705 the bounding geometry is based on the contentof the label, its label type (whether it is a text string or an icon),conditions of the electronic map (e.g., pitch, rotation, and zoom), thestyle of the layer the label is in, and whether the label is a pointlabel or a line label. For example, the length of a text string mayfactor into the length of the bounding geometry or a number of circlesincluded in the bounding geometry. The bounding geometry is determined705 such that it fits to the label within a threshold amount (e.g., inunits of distance such as pixels), thereby enabling the boundinggeometry to accurately represent the label during collision detection.

The collision handling module 170 inserts 710 the bounding geometry intothe grid index. The bounding geometry requires a certain amount of spacein the grid index, such as a number of pixels or a certain area definedin global coordinate space. The bounding geometry is also placed at aspecific location in the grid index based on where it would be renderedin the electronic map. For example, at the location of an anchor asmapped to the grid index from the viewport. Once the bounding geometryis in its proper place, the collision handling module 170 identifies 715disjoint regions of the grid index intersected by the bounding geometry.For example, as detailed supra, the bounding geometry of line label 450intersects disjoint regions 522, 524, 526, 532, and 534 of grid index500 in FIG. 5. The disjoint regions intersected by the bounding geometrydepend upon the size and location of the label within the electronic mapwith respect to the viewport, which the grid index maps to. In anembodiment, inserting 710 the bounding geometry does not include addingit to the rendered electronic map and/or grid index, but rather checkingwhether the bounding geometry would intersect other geometries if itwere added.

The collision handling module 170 analyzes 720 each disjoint regionintersected by the bounding geometry to determine whether the portion ofthe disjoint region taken by the bounding geometry overlaps a portion ofany other geometry already within the disjoint region. For example,disjoint region 522 in FIG. 6 is intersected by the bounding geometriesof point label 440 and line label 450. The two geometries take updifferent pixels within the disjoint region 522 and therefore do notoverlap. As such the labels do not intersect at this disjoint region.Alternatively, for example, a rectangle bounding geometry with globalcoordinate corners (0,0), (0,10), (10,0), and (10,10), and a circlebounding geometry with global coordinate center (12, 1) and radius of 3,intersect due to overlapping coordinate space, as the circle extendsinto area within the rectangular bounding geometry such as at (9,1).Therefore whichever of the two geometries is inserted second is notadded to the grid index, nor is it added to the rendered electronic map.

Once the collision handling module 170 has analyzed 720 each disjointregion intersected by the bounding geometry, it determines 725 whetherthe bounding geometry collides with another geometry within the gridindex. If the analysis 720 of any of the analyzed disjoint regionsdetermines that the bounding geometry overlaps another geometry in atleast one of the analyzed disjoint regions, the bounding geometry as awhole is considered to be collided. One geometry overlaps another whenits placement requires occupation by the one geometry of a portion ofthe grid index already occupied by another geometry. For example, apixel already used by another geometry, or an area within globalcoordinate space already occupied by another geometry. Upon determiningvia analysis 720 that the bounding geometry is collided, the boundinggeometry is removed 730 from the grid index and the label is marked 735Aas collided. As such, the label is not rendered in the electronic map.In an embodiment, the label is marked 735A as collided in an index, suchas a cross tile symbol index (CTSI), as detailed infra. Alternatively,in other embodiments, the label may be marked 735A at the grid index orat the vector tile, or the label itself may be altered to represent thatit is marked 735A.

If instead the collision handling module 170 determines 725 that thebounding geometry does not collide with another geometry at any disjointregion intersected by the bounding geometry, the collision handlingmodule 170 marks 735B the bounding geometry as used. As such, the labelis rendered in the electronic map. Similar to the collided case,depending upon the embodiment, the label may be marked 735B at the CTSI,the grid index, or at the vector tile, or the label itself may bealtered to represent that it is marked 735B.

Based on whether or not the bounding geometry collides with anothergeometry in the grid index, the collision handling module 170 sets 750 atarget opacity associated with the label. If the bounding geometrycollides with another geometry, the target opacity is set to indicatethe label should not be rendered, or is to be rendered as whollytransparent. Alternatively, if the bounding geometry does not collidewith another geometry, the target opacity is set to indicate the labelshould be rendered, or is to be rendered as opaque. Opacity is furtherdiscussed infra and impacts label rendering and animation. In anembodiment, the target opacity is recorded in the CTSI.

VII. Duplicate Detection

FIG. 8 illustrates a process to add a vector tile to a tile pyramid anddetecting label duplicates therein, according to one embodiment. In someembodiments vector data includes duplicate labels, such as labels for amap feature from different vector data sources, e.g. third party sourcesexternal to the system 100. Alternatively, duplicate labels may arisefrom vector tiles of different zoom levels representing the samegeographic area and both existing in the render tree, or from a labelfor the same map feature existing in multiple layers.

The CTSI is an index that coordinates labels across tiles and layers.Each label in the render tree is recorded in the CTSI; if a vector tileis removed from the render tree, its labels are removed from the CTSI,and when a vector tile is added to the render tree, its labels areadded. In an embodiment the CTSI is updated each time a vector tile isadded to or removed from the render tree. Each label in the CTSI has across tile identifier (CTID). Duplicate labels are assigned the sameCTID. For example, a first “University Avenue” label in a first layerhas CTID 00005 in the CTSI, and a second “University Avenue” label in asecond layer also has CTID 00005 in the CTSI. When a vector tile isadded to the render tree, each label is checked to determine whether itis a duplicate, and if so it is assigned the correct CTID. The CTSIrecords, for each CTID, a current opacity and a target opacity.Opacities are further discussed infra in section VIII. Label Animation.

The collision handling module 170 adds 805 a vector tile to the rendertree. The collision handling module 170 then identifies 810 the vectortile's vector tile family within the render tree. Duplicate labels arisefrom other vector tiles in the vector tile family; therefore the vectortile family needs to be checked against for duplicative labels. For eachlabel in the added vector tile (each “first label”), the first label'svector tile coordinates are converted 815 to global coordinates. In anembodiment, the global coordinates are rounded down. The following stepsof the process are performed for each vector tile in the vector tilefamily, per layer, for each first label.

For the vector tile in the vector tile family, each label in the layerof similar type to the first label (e.g., text or icon) is identified820 by the collision handling module 170. Then, for each label in thelayer of similar type (each “second label”), the second label's vectortile coordinates are converted 825 to global coordinates by thecollision handling module 170. In an embodiment, the global coordinatesare rounded down. The collision handling module 170 compares 830 theglobal coordinates of the first label and each second label. For eachsecond label, if the collision handling module 170 determines based onthe comparison 830 that the first label and second label are within aglobal coordinate threshold of each other, the first label is assigned835 the second label's CTID in the CTSI and thereby treated as aduplicate. Though this embodiment describes one possible method fordetecting duplicate labels, other methods can also be used to achievethe same result.

In some embodiments, labels of different types are identified asduplicate differently. For example, icon labels, such as a tree icon fora forest, are identified as duplicative according to the processdetailed supra, whereas text labels are identified as duplicative basedon a comparison of the first label's text to the text of the secondlabel. In such embodiments, it is the text comparison (performed, forexample, by the collision handling module 170) that determines whetheror not text labels are duplicative, rather than global coordinates. Inan embodiment, both the text and coordinates of a text label are used todetermine whether the text label is a duplicate.

VIII. Label Animation

FIG. 9 illustrates fading a label in or out upon an electronic map,according to one embodiment. In an embodiment, rather than fullyrendering immediately, labels fade in or out as they are added to orremoved from the rendered electronic map. As detailed supra, labels offront-most vector tiles are rendered. If an electronic map is zoomed in,the front-most vector tile may change from a z4 to a z5 vector tile, forexample. A label may be duplicated by being in both the z4 and z5 vectortiles. For example, a city name label may be in vector tiles at bothzoom levels. Fading out the z4 label and fading in the z5 label may bevisually displeasing to a user of the electronic map. As such, enablingthe z5 label to inherit the fade state of the z4 label allows forcontinuous rendering of labels across zoom levels, which may be morevisually appealing to a user of the electronic map.

As detailed supra, each CTID is associated with a current opacity and atarget opacity, the latter of which is set during label collisiondetection. The current opacity is a level of fade of the labelassociated with the CTID and the target opacity is what the currentopacity is fading towards—either fading in or fading out. For example,if “1” represents a fully faded in or rendered label and “0” representsa fully faded out or transparent label, having a (current opacity,target opacity) pair of (0,0) indicates a label is both not rendered andis not fading in, (0,1) indicates a label is not rendered but is fadingin, (1,0) indicates a label is rendered but is fading out, and (1,1)indicates a label is rendered and is to remain rendered. The currentopacity updates over time, towards the target opacity, to animate thefade effect. Depending upon the embodiment, the current opacity updatesat rate based on a frame rate of the display 216 of the mobile computingdevice 150, or a rate based on the clock rate of the processor 204 orGPU 206 of the mobile computing device 150. In an embodiment, the GPU206 of the mobile computing device 150 interpolates between the currentand target opacities, and the interpolated opacity is the opacityactually displayed. In an embodiment, the current opacity is onlyrecorded in the CTSI with the performance of collision detection, thoughit updates (and is rendered) at the rate based on the frame rate orclock rate.

The example of FIG. 9 illustrates label animation according to oneembodiment. The rendered electronic map includes a “Palo Alto” label910A that is associated in the CTSI with opacity parameters (1,1). Thecollision handling module 170 performs collision detection anddetermines the label 910A intersects another label and therefore setslabel 910A's target opacity to 0. As such the label 910A begins fadingout, losing opacity each time the display 216 of the mobile computingdevice 150 refreshes. The collision handling module 170 again performscollision detection, recording the current opacity at 0.5, indicatingthe label 910B is half way faded out. The electronic map is then zoomedto a higher zoom level where there is also a “Palo Alto” label. As such,this label is assigned the same CTID as the original “Palo Alto” label.Hence, when this new label is rendered at 920, it inherits the fade ofthe original label, (0.5,0). In this way, label fading remains smoothacross zoom levels. The label 920 continues to fade out, eventuallycompletely disappearing from the rendered electronic map. When collisiondetection runs again, the recorded current opacity is updated to (0,0).

In an embodiment, when a label is added to the CTSI, it is assigned aninitial set of opacity parameters, such as (0,0). If there are noduplicate labels for a label added to the CTSI, it is assigned a newCTID. When a vector tile is removed from the render tree, its labels areremoved from the CTSI; if any of the removed labels were the last in theCTSI with a respective CTID, those CTIDs are recycled for the next oneor more new labels entered in the CTSI.

IX. Additional Considerations

In the foregoing specification, embodiments of the invention have beendescribed with reference to numerous specific details that may vary fromimplementation to implementation. The specification and drawings are,accordingly, to be regarded in an illustrative rather than a restrictivesense. The sole and exclusive indicator of the scope of the invention,and what is intended by the applicants to be the scope of the invention,is the literal and equivalent scope of the set of claims that issue fromthis application, in the specific form in which such claims issue,including any subsequent correction.

What is claimed is:
 1. A computer-implemented method comprising:determining a bounding geometry for a label as part of an electronicmap; inserting the determined bounding geometry into a grid index,wherein the grid index represents a viewport of the electronic map;identifying disjoint regions of the grid index intersected by thedetermined bounding geometry, wherein different disjoint regionsrepresent different portions of the viewport; for one or moreintersected disjoint regions: identifying a position of the determinedbounding geometry within the intersected disjoint region; identifyingpositions of one or more existing bounding geometries in the disjointregion; and determining whether the identified position of thedetermined bounding geometry and the identified positions of at leastone of the one or more existing bounding geometries overlap; andresponsive to identifying that the determined bounding geometry overlapsat least one of the one or more existing bounding geometries, setting atarget opacity of the label.
 2. The method of claim 1, wherein thedetermined bounding geometry overlaps at least one of the one or moreexisting bounding geometries, further comprising: removing thedetermined bounding geometry from the grid index; and marking the labelas collided.
 3. The method of claim 1, wherein the determined boundinggeometry does not overlap any existing bounding geometries, furthercomprising: marking the determined bounding geometry as used.
 4. Themethod of claim 1, wherein a size of each disjoint region is based atleast in part on a size of the determined bounding geometry.
 5. Themethod of claim 4, wherein the size of each disjoint region is within athreshold amount of double the size of the determined bounding geometry.6. The method of claim 1, wherein the label comprises a text stringcomprising a plurality of letters, wherein the determined boundinggeometry comprises a set of circles such that there is a circle for eachletter of the plurality of letters.
 7. The method of claim 1, whereinthe label comprises a text string comprising a plurality of letters,wherein the determined bounding geometry comprises a set of circles suchthat a beginning and an end of the text string are bounded, there is notmore than a first threshold distance between adjacent circles, and thereis not more than a threshold amount of overlap between circles.
 8. Themethod of claim 1, wherein determining the determined bounding geometryfor the label comprises: determining the label is a line label;identifying a line geometry associated with the label; identifying asize of the label; and fitting one or more circles to the label based atleast in part on the size and the line geometry.
 9. The method of claim8, wherein the size of the label is based at least in part on a style.10. The method of claim 1, wherein identifying whether the determinedbounding geometry overlaps at least one of the one or more existingbounding geometries comprises: for each existing bounding geometry inthe disjoint region: comparing coordinate space overlapped by thedetermined bounding geometry and coordinate space overlapped by theexisting bounding geometry.
 11. The method of claim 1, whereindetermining whether the positions of the determined bounding geometryand the one or more existing bounding geometries overlap comprises:identifying pixels used by the one or more existing bounding geometries;identifying pixels used by the determined bounding geometry; anddetermining whether at least one pixel is used by both the boundinggeometry and the existing bounding geometry.
 12. The method of claim 1,wherein determining whether the positions of the determined boundinggeometry and the one or more existing bounding geometries overlapcomprises: identifying global coordinate bounds of the one or moreexisting bounding geometries; identifying global coordinate bounds ofthe determined bounding geometry; and determining whether at the globalcoordinate bounds of the one or more existing bounding geometries andthe global coordinate bounds of the determined bounding geometry includeshared coordinate space.
 13. A non-transitory computer-readable storagemedium storing executable instructions that, when executed by aprocessor, cause the processor to perform steps comprising: determininga bounding geometry for a label as part of an electronic map; insertingthe determined bounding geometry into a grid index, wherein the gridindex represents a viewport of the electronic map; identifying disjointregions of the grid index intersected by the determined boundinggeometry, wherein different disjoint regions represent differentportions of the viewport; for one or more intersected disjoint regions:identifying a position of the determined bounding geometry within theintersected disjoint region; identifying positions of one or moreexisting bounding geometries in the disjoint region; and determiningwhether the identified position of the determined bounding geometry andthe identified positions of at least one of the one or more existingbounding geometries overlap; and responsive to determining that thedetermined bounding geometry overlaps at least one of the one or moreexisting bounding geometries, setting a target opacity of the label. 14.The non-transitory computer-readable storage medium of claim 13, whereinthe determined bounding geometry overlaps at least one of the one ormore existing bounding geometries, the steps further comprising:removing the determined bounding geometry from the grid index; andmarking the label as collided.
 15. The non-transitory computer-readablestorage medium of claim 13, wherein the determined bounding geometryoverlaps at least one of the one or more existing bounding geometries,further comprising: marking the determined bounding geometry as used.16. The non-transitory computer-readable storage medium of claim 13,wherein the label comprises a text string comprising a plurality ofletters, wherein the determined bounding geometry comprises a set ofcircles such that a beginning and an end of the text string are bounded,there is not more than a first threshold distance between adjacentcircles, and there is not more than a threshold amount of overlapbetween circles.
 17. The non-transitory computer-readable storage mediumof claim 13, wherein determining the determined bounding geometry forthe label comprises: determining the label is a line label; identifyinga line geometry associated with the label; identifying a size of thelabel; and fitting one or more circles to the label based at least inpart on the size and the line geometry.
 18. The non-transitorycomputer-readable storage medium of claim 13, wherein determiningwhether the determined bounding geometry overlaps at least one of theone or more existing bounding geometries: for each existing boundinggeometry in the disjoint region: comparing coordinate space overlappedby the determined bounding geometry and coordinate space overlapped bythe existing bounding geometry.
 19. The non-transitory computer-readablestorage medium of claim 13, wherein determining whether the determinedbounding geometry overlaps at least one of the one or more existingbounding geometries comprises: identifying pixels used by the one ormore existing bounding geometries; identifying pixels used by thedetermined bounding geometry; and determining whether at least one pixelis used by both the bounding geometry and the existing boundinggeometry.
 20. The non-transitory computer-readable storage medium ofclaim 13, wherein determining whether the determined bounding geometryoverlaps at least one of the one or more existing bounding geometriescomprises: identifying global coordinate bounds of the one or moreexisting bounding geometries; identifying global coordinate bounds ofthe determined bounding geometry; and determining whether at the globalcoordinate bounds of the one or more existing bounding geometries andthe global coordinate bounds of the determined bounding geometry includeshared coordinate space.